<template>
  <uni-row :gutter="10" class="w_100">
    <uni-col :span="item.col || col ||24" @click="onClick(item)" v-for="(item, index) in dataList" :key="index + 'col'" :align="'center'">
      <slot :row="item"></slot>
    </uni-col>
  </uni-row>
</template>

<script setup lang="ts">
import { IColTemplate } from '#/container/IRowColInterface';
import { computed, PropType } from 'vue';
defineOptions({ options: { styleIsolation: 'shared' } });
const props = defineProps({
  rowDataList: {
    type: Object as PropType<IColTemplate<any>[]>, // 明确类型为 string
    required: true
  },
  col: {
    type: Number as () => number, // 明确类型为 string
    default: () => 6
  }
});
const dataList = computed(() => props.rowDataList.filter(item => item.isShow != false));
const onClick = (item: IColTemplate<any>) => {
  console.log(item);
};
</script>

<style scoped lang="scss">
::v-deep .uv-scroll-list__scroll-view__content {
  width: 100%;
}
</style>
